<template>
	<view class="user clearfix  hv100">
		<cu-custom bgColor="bg-white " isBack>
			<block slot="content">修改昵称</block>
		</cu-custom>
		<view class="cu-form-group  bg-white mt5  solid-bottom mh60" >
			<view class="title">我的昵称</view>
			<input class=" text-right" placeholder-class="color-info" placeholder="请输入昵称" v-model="niName" />
		</view>
		<view class="px15">
			<view class="button-jianbian text-white discenter h40 mt30 f16   radius-5" @click="tijiao">确认修改</view>
		</view>
	</view>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
	data() {
		return {
			niName:''
		}
	},
	methods: {
		async tijiao(){
			if (this.niName == '') {
				uni.showToast({
					title:'请输入昵称',
					icon:'none'
				})
				return false
			} else {
				let { data } = await this.$http.post('user.saveinfo', {niName:this.niName}, {
					tipConfig: { storeLoading: true,isloading:true, isSuccessTip: true, isSuccessBack: true, navigateBack: 1 }
				})
				
			}
		}
	}
}
</script>

<style lang="less">
.bg-tuichu {
	background-color: #047283 !important;
}
.box-line {
	width: calc(100% - 40rpx);
	height: 1px;
	background-color: #3E4755;
}


.h10{
	height: 20rpx !important;
}
.mh60{
	min-height: 120rpx;
}




</style>
